import time
import datetime
import random
from syshock import *

import winsound
Freq = 2500 # Set Frequency To 2500 Hertz
Dur = 2000 # Set Duration To 1000 ms == 1 second



win_title = "Untitled - Notepad"



offwork = datetime.datetime( int(time.strftime( "%Y", time.localtime( time.time() ) )) ,int(time.strftime( "%m", time.localtime( time.time() ) )),int(time.strftime( "%d", time.localtime( time.time() ) ) ),00)

while offwork < datetime.datetime.now():
    # hwnd_lst = findWindow(win_title)
    # if hwnd_lst:
    #     topWindow( hwnd_lst )
    #     clickWindow (hwnd_lst)
    #     time.sleep(60)
    # else:
    #     print "None"
    x = random.randint(500, 1000);
    y = random.randint(500, 1000);
    print "x:"+ str(x) + ",y:"+ str(y)
    moveMouse(x,y)    
    time.sleep(1)

print 'exit'
winsound.Beep(Freq,Dur)

createProcess("shutdown -s")

